﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SD.IBUS;
using SD.Entities;
using SD.IDAL;
using SD.DAL;
using System.Data.SqlClient;

namespace SD.BUS
{
    public class CountyBIZ: BaseBIZ, ICountyBIZ
    {
        #region ICountyBIZ Members

        /// <summary>
        /// Get all county add into list county
        /// </summary>
        /// <returns>list county</returns>
        public List<County> GetAll()
        {
            List<County> lstResult = new List<County>();
            try
            {
                ICountyDAO countyDAO = new CountyDAO();
                lstResult = countyDAO.GetAll();
            }
            catch (SqlException ex)
            {
                throw ex;
            }

            return lstResult;
        }

        /// <summary>
        /// Get detail county by countyID
        /// </summary>
        /// <param name="countyId"></param>
        /// <returns>County</returns>
        public County GetById(string countyId)
        {
            County result = null;
            try
            {
                ICountyDAO countyDAO = new CountyDAO();
                result = countyDAO.GetById(countyId);
            }
            catch (SqlException ex)
            {
                throw ex;
            }

            return result;
        }

        /// <summary>
        /// Process exception for event insert
        /// </summary>
        /// <param name="county"></param>
        /// <returns>true or false</returns>
        public bool Insert(County county)
        {
            throw new NotImplementedException();
        }

        /// <summary>
        ///  Process exception for event Update
        /// </summary>
        /// <param name="county"></param>
        /// <returns>true or false</returns>
        public bool Update(County county)
        {
            throw new NotImplementedException();
        }
        
        /// <summary>
        /// Process exception for event delete
        /// </summary>
        /// <param name="countyId"></param>
        /// <returns>true or false</returns>
        public bool Delete(string countyId)
        {
            throw new NotImplementedException();
        }

        #endregion
    }
}
